<?php

include_once "XHTML_Html.php";
include_once "XHTML_Div.php";
include_once "XHTML_Free_Text.php";
include_once "XHTML_Table.php";
include_once "XHTML_Td.php";
include_once "XHTML_Tr.php";

$myTitle = new XHTML_Title("Esta mi PRUEBA");

$myStyle = new XHTML_Style("text/css");
$myStyle->setId("estilo");
$myStyle->setText("body { background-color: black}");
$myStyle1 = new XHTML_Style("text/css");
$myStyle1->setId("estilo1");
$myStyle2 = new XHTML_Style("text/css");
$myStyle2->setId("estilo2");
$myStyle2->setText("body { background-color: yellow}");

$myHead = new XHTML_Head($myTitle);
$myHead->addStyle($myStyle);
$myHead->addStyle($myStyle1);
$myHead->removeStyle($myStyle);
$myHead->addStyle($myStyle2);

$myFreeText = new XHTML_Free_Text("Esto es una pruebita.");

$myDiv = new XHTML_Div();

$myFreeText = new XHTML_Free_Text("Esto es una prueba");

$myDiv->addElement($myFreeText);

$myTd = new XHTML_Td();
$myTd->addElement($myFreeText);

$myTr = new XHTML_Tr($myTd);

$myTable = new XHTML_Table($myTr);
$myTable->setBorder(1);

$myBody = new XHTML_Body();
$myBody->addElement($myDiv);
$myBody->addElement($myTable);

$myHtml = new XHTML_Html($myHead, $myBody);

echo $myHtml->toString();

?>